const app = getApp(); //引入导航

var util = require('../../utils/common.js'); //引入公共JS


var qhdj = '';
import { MyReserve } from 'myReserve.model.js';
var myreserve = new MyReserve();
Page({
  data: {
    showIcon: true //显示返回键以及首页

  },
  onLoad: function (options) {
    this._onLoad();
  },
  _onLoad: function () {
    myreserve.getYuDingYi(res => {
      this.setData({
        'List': res
      });
      qhdj = res;
    });
  },
  //分享
  onShareAppMessage: function () {
    util.sharePage();
  },
  Tiaozhuan: function (e) {
    var notes = e.target.dataset.notes;
    var id = e.target.dataset.id;
    var addtime = e.target.dataset.addtime;
    var num = e.target.dataset.num;
    var price = e.target.dataset.price;
    var shorttitle = e.target.dataset.shorttitle;
    var spzt = e.target.dataset.spzt;
    var ycdate = e.target.dataset.ycdate;
    var tel = e.target.dataset.tel;
    tt.redirectTo({
      url: '../reserveDetail/reserveDetail?id=' + id + '&addtime=' + addtime + '&notes=' + notes + '&num=' + num + '&price=' + price + '&shorttitle=' + shorttitle + '&spzt=' + spzt + '&tel=' + tel + '&ycdate=' + ycdate
    });
  }
});